<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        // 简单数据类型存的是值，放在栈里面
        // 复杂数据类型存的地址。放在栈里面，值放在堆里面
        let num1 = 10
        let num2 = num1
        num2 = 20
        console.log(num1);      //10
        console.log(num2);      //20


        let obj1 = {
            age: 18
        }
        let obj2 = obj1
        obj2.age = 20
        console.log(obj1);       //agr:20
        console.log(obj2);      //age:20
    </script>
</body>

</html>